package com.jrtc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jrtc.base.entity.bo.Doctor;
import com.jrtc.base.entity.bo.Exerciseprescription;
import com.jrtc.base.entity.vo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 运动处方表(Exerciseprescription)表服务接口
 *
 * @author makejava
 * @since 2022-03-21 17:32:51
 */
public interface ExerciseprescriptionService {

    /**
     * 通过ID查询单条数据
     *
     * @param prescriptionId 主键
     * @return 实例对象
     */
    Exerciseprescription queryById(Integer prescriptionId);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<Exerciseprescription> queryAllByLimit(int offset, int limit);
    
    IPage<Exerciseprescription> queryExerciseprescriptionList(Exerciseprescription exerciseprescription);

    /**
     * 新增数据
     *
     * @param exerciseprescription 实例对象
     * @return 实例对象
     */
    Exerciseprescription insert(Exerciseprescription exerciseprescription);

    /**
     * 修改数据
     *
     * @param exerciseprescription 实例对象
     * @return 实例对象
     */
    Exerciseprescription update(Exerciseprescription exerciseprescription);

    /**
     * 通过主键删除数据
     *
     * @param prescriptionId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer prescriptionId);

    /**
     * 查询指定运动处方详细信息
     * */
    public Exerciseprescription prescribingDetails(Integer prescriptionId, String prescriptionDesc) throws Exception;

    /**
     * 修改运动处方信息
     * */
    public int modifyInformation(Exerciseprescription exerciseprescription) throws Exception;

    /**
     * 创建运动处方
     * */
    public int insertExerciseprescription(Exerciseprescription exerciseprescription, Doctor loginDoctor) throws Exception;

    /**
     * 上传运动处方文件/视频
     */
    public List<String> uploadFile(List<MultipartFile> fileList, String type) throws Exception;

    /**
     * 模糊搜索运动处方
     * */
    public List<Exerciseprescription> selectExerciseprescriptionByPrescriptionName(String prescriptionName);

    /**
     * 条件查询康复运动
     * */
    public List<ExerciseprescriptionDiseaseVo> selectExerciseprescriptionByDisease(Integer diseaseId, String people) throws Exception;

    /**
     * 运动处方
     * */
    public List<PrescriptionTypeVo> exercisePrescription(ExercisePrescriptionVo exercisePrescriptionVo);

    /**
     * 运动处方详情
     * */
//    public Exerciseprescription exerciseDetails(Integer id, String idCard) throws Exception;
    public Exerciseprescription exerciseDetails(Integer id, Integer healthplanId) throws Exception;

    /**
     * 患者的运动处方
     * */
    public List<Exerciseprescription> patientExercise(Integer id);

    /**
     * 查询待修改的运动处方信息
     * */
    public Exerciseprescription selectExercise(Integer id);
}